<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::StereoSGBM Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html">StereoSGBM</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="../../d8/d94/classcv_1_1StereoSGBM-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::StereoSGBM Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="../../d9/d0c/group__calib3d.html">Camera Calibration and 3D Reconstruction</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>The class implements the modified H. Hirschmuller algorithm <a class="el" href="../../d0/de3/citelist.html#CITEREF_HH08">[112]</a> that differs from the original one as follows:  
 <a href="../../d2/d85/classcv_1_1StereoSGBM.html#details">More...</a></p>
<p><code>#include &lt;opencv2/calib3d.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cv::StereoSGBM:</div>
<div class="dyncontent">
 <div class="center">
  <img alt="" src="../../d2/d85/classcv_1_1StereoSGBM.png" usemap="#cv::StereoSGBM_map"/>
  <map id="cv::StereoSGBM_map" name="cv::StereoSGBM_map">
<area alt="cv::StereoMatcher" coords="0,56,131,80" href="../../d2/d6e/classcv_1_1StereoMatcher.html" shape="rect" title="The base class for stereo correspondence algorithms. "/>
<area alt="cv::Algorithm" coords="0,0,131,24" href="../../d3/d46/classcv_1_1Algorithm.html" shape="rect" title="This is a base class for all more or less complex algorithms in OpenCV. "/>
<area alt="cv::cuda::StereoSGM" coords="0,168,131,192" href="../../d1/ddc/classcv_1_1cuda_1_1StereoSGM.html" shape="rect" title="The class implements the modified H. Hirschmuller algorithm . Limitation and difference are as follow..."/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a74120f5b7739495309c57f2da1c3e8cc"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/>
  <a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a74120f5b7739495309c57f2da1c3e8cca21fac9fae6db6a60a940fd24cc61f081">MODE_SGBM</a> = 0, 
<br/>
  <a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a74120f5b7739495309c57f2da1c3e8cca0f746667febe92e1189e924c40752660">MODE_HH</a> = 1, 
<br/>
  <a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a74120f5b7739495309c57f2da1c3e8ccaa3ffd07d169f0d913c2402bf20595a9f">MODE_SGBM_3WAY</a> = 2, 
<br/>
  <a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a74120f5b7739495309c57f2da1c3e8cca2bb93a960b8709039f81d7027b928559">MODE_HH4</a> = 3
<br/>
 }</td></tr>
<tr class="separator:a74120f5b7739495309c57f2da1c3e8cc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_types_classcv_1_1StereoMatcher"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classcv_1_1StereoMatcher')"><img alt="-" src="../../closed.png"/> Public Types inherited from <a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html">cv::StereoMatcher</a></td></tr>
<tr class="memitem:a6e000cf59a6aabbc8bef2e2a5c132aca inherit pub_types_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/>
  <a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#a6e000cf59a6aabbc8bef2e2a5c132acaa6aadf3b0bd4503bde2531592e5f90e0b">DISP_SHIFT</a> = 4, 
<br/>
  <a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#a6e000cf59a6aabbc8bef2e2a5c132acaa5b4b128a781d8002c3bc2640912295a4">DISP_SCALE</a> = (1 &lt;&lt; DISP_SHIFT)
<br/>
 }</td></tr>
<tr class="separator:a6e000cf59a6aabbc8bef2e2a5c132aca inherit pub_types_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a27faa3d735e82d2b44f8eb13e2ba0a90"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a27faa3d735e82d2b44f8eb13e2ba0a90">getMode</a> () const =0</td></tr>
<tr class="separator:a27faa3d735e82d2b44f8eb13e2ba0a90"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a387cc8f9a90d0b43b491bb1a55357023"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a387cc8f9a90d0b43b491bb1a55357023">getP1</a> () const =0</td></tr>
<tr class="separator:a387cc8f9a90d0b43b491bb1a55357023"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5ad84c9f98f5ed4663bc9f50fc00d413"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a5ad84c9f98f5ed4663bc9f50fc00d413">getP2</a> () const =0</td></tr>
<tr class="separator:a5ad84c9f98f5ed4663bc9f50fc00d413"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a400e482f280339ce05beccd9ed9e5bfb"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a400e482f280339ce05beccd9ed9e5bfb">getPreFilterCap</a> () const =0</td></tr>
<tr class="separator:a400e482f280339ce05beccd9ed9e5bfb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa0f168808513cabc221b763664791185"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#aa0f168808513cabc221b763664791185">getUniquenessRatio</a> () const =0</td></tr>
<tr class="separator:aa0f168808513cabc221b763664791185"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a32617c11dbdac9b689711a38cd928017"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a32617c11dbdac9b689711a38cd928017">setMode</a> (int mode)=0</td></tr>
<tr class="separator:a32617c11dbdac9b689711a38cd928017"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae62e17715deea97b431d328869a3eace"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#ae62e17715deea97b431d328869a3eace">setP1</a> (int P1)=0</td></tr>
<tr class="separator:ae62e17715deea97b431d328869a3eace"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a13a55a4704c988fa60e5f5902c4abfaa"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a13a55a4704c988fa60e5f5902c4abfaa">setP2</a> (int P2)=0</td></tr>
<tr class="separator:a13a55a4704c988fa60e5f5902c4abfaa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a03019cccd79bcc833dd2423c55654975"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a03019cccd79bcc833dd2423c55654975">setPreFilterCap</a> (int preFilterCap)=0</td></tr>
<tr class="separator:a03019cccd79bcc833dd2423c55654975"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac7b3c009706c6809211b7c5e79434ebd"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#ac7b3c009706c6809211b7c5e79434ebd">setUniquenessRatio</a> (int uniquenessRatio)=0</td></tr>
<tr class="separator:ac7b3c009706c6809211b7c5e79434ebd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcv_1_1StereoMatcher"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcv_1_1StereoMatcher')"><img alt="-" src="../../closed.png"/> Public Member Functions inherited from <a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html">cv::StereoMatcher</a></td></tr>
<tr class="memitem:a03f7087df1b2c618462eb98898841345 inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#a03f7087df1b2c618462eb98898841345">compute</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> left, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> right, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> disparity)=0</td></tr>
<tr class="memdesc:a03f7087df1b2c618462eb98898841345 inherit pub_methods_classcv_1_1StereoMatcher"><td class="mdescLeft"> </td><td class="mdescRight">Computes disparity map for the specified stereo pair.  <a href="../../d2/d6e/classcv_1_1StereoMatcher.html#a03f7087df1b2c618462eb98898841345">More...</a><br/></td></tr>
<tr class="separator:a03f7087df1b2c618462eb98898841345 inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9ab4290840ac7a9270af455f74b30b98 inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#a9ab4290840ac7a9270af455f74b30b98">getBlockSize</a> () const =0</td></tr>
<tr class="separator:a9ab4290840ac7a9270af455f74b30b98 inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0ca2c2ab88e7ecac58720134867ea072 inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#a0ca2c2ab88e7ecac58720134867ea072">getDisp12MaxDiff</a> () const =0</td></tr>
<tr class="separator:a0ca2c2ab88e7ecac58720134867ea072 inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abd790d22519d3c0d4fcb8e3210d11b13 inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#abd790d22519d3c0d4fcb8e3210d11b13">getMinDisparity</a> () const =0</td></tr>
<tr class="separator:abd790d22519d3c0d4fcb8e3210d11b13 inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab3a3d5f5a49f77be0b965557e17d9fdd inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#ab3a3d5f5a49f77be0b965557e17d9fdd">getNumDisparities</a> () const =0</td></tr>
<tr class="separator:ab3a3d5f5a49f77be0b965557e17d9fdd inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afb686d0de4551e86306f10509632fa24 inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#afb686d0de4551e86306f10509632fa24">getSpeckleRange</a> () const =0</td></tr>
<tr class="separator:afb686d0de4551e86306f10509632fa24 inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1be922bd3111d427fd2ddc8448537c35 inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#a1be922bd3111d427fd2ddc8448537c35">getSpeckleWindowSize</a> () const =0</td></tr>
<tr class="separator:a1be922bd3111d427fd2ddc8448537c35 inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a38814e8a33d59f4eb5db33de04fe8c34 inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#a38814e8a33d59f4eb5db33de04fe8c34">setBlockSize</a> (int blockSize)=0</td></tr>
<tr class="separator:a38814e8a33d59f4eb5db33de04fe8c34 inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aede8620506ff7f27d106fff25777514d inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#aede8620506ff7f27d106fff25777514d">setDisp12MaxDiff</a> (int disp12MaxDiff)=0</td></tr>
<tr class="separator:aede8620506ff7f27d106fff25777514d inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae67a506bfe7fbd37444b6713aea1c0ad inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#ae67a506bfe7fbd37444b6713aea1c0ad">setMinDisparity</a> (int minDisparity)=0</td></tr>
<tr class="separator:ae67a506bfe7fbd37444b6713aea1c0ad inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abacfe4e5760e86b48d0c19bd4106c2fc inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#abacfe4e5760e86b48d0c19bd4106c2fc">setNumDisparities</a> (int numDisparities)=0</td></tr>
<tr class="separator:abacfe4e5760e86b48d0c19bd4106c2fc inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3c9106923f87592b98bf53e90bcba020 inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#a3c9106923f87592b98bf53e90bcba020">setSpeckleRange</a> (int speckleRange)=0</td></tr>
<tr class="separator:a3c9106923f87592b98bf53e90bcba020 inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad21033d76ad7cdf36a5c8bb6cd946d43 inherit pub_methods_classcv_1_1StereoMatcher"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6e/classcv_1_1StereoMatcher.html#ad21033d76ad7cdf36a5c8bb6cd946d43">setSpeckleWindowSize</a> (int speckleWindowSize)=0</td></tr>
<tr class="separator:ad21033d76ad7cdf36a5c8bb6cd946d43 inherit pub_methods_classcv_1_1StereoMatcher"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Public Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a827c8b2781ed17574805f373e6054ff1 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a827c8b2781ed17574805f373e6054ff1">Algorithm</a> ()</td></tr>
<tr class="separator:a827c8b2781ed17574805f373e6054ff1 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8ae826127fa0f1f8d10a24841bd376f8 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a8ae826127fa0f1f8d10a24841bd376f8">~Algorithm</a> ()</td></tr>
<tr class="separator:a8ae826127fa0f1f8d10a24841bd376f8 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#aec9c965448e4dc851d7cacd3abd84cd1">clear</a> ()</td></tr>
<tr class="memdesc:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Clears the algorithm state.  <a href="../../d3/d46/classcv_1_1Algorithm.html#aec9c965448e4dc851d7cacd3abd84cd1">More...</a><br/></td></tr>
<tr class="separator:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab6a18f1825475643e94381697d413972 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#ab6a18f1825475643e94381697d413972">empty</a> () const</td></tr>
<tr class="memdesc:ab6a18f1825475643e94381697d413972 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html" title="This is a base class for all more or less complex algorithms in OpenCV. ">Algorithm</a> is empty (e.g. in the very beginning or after unsuccessful read.  <a href="../../d3/d46/classcv_1_1Algorithm.html#ab6a18f1825475643e94381697d413972">More...</a><br/></td></tr>
<tr class="separator:ab6a18f1825475643e94381697d413972 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a286fc82744ccab3d248aca44524266a9 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a286fc82744ccab3d248aca44524266a9">getDefaultName</a> () const</td></tr>
<tr class="separator:a286fc82744ccab3d248aca44524266a9 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#aef2ad3f4145bd6e8c3664eb1c4b5e1e6">read</a> (const <a class="el" href="../../de/dd9/classcv_1_1FileNode.html">FileNode</a> &amp;fn)</td></tr>
<tr class="memdesc:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Reads algorithm parameters from a file storage.  <a href="../../d3/d46/classcv_1_1Algorithm.html#aef2ad3f4145bd6e8c3664eb1c4b5e1e6">More...</a><br/></td></tr>
<tr class="separator:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0a880744bc4e3f45711444571df47d67 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a0a880744bc4e3f45711444571df47d67">save</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename) const</td></tr>
<tr class="separator:a0a880744bc4e3f45711444571df47d67 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a1f8ad7b8add515077367fb9949a174d2">write</a> (<a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &amp;fs) const</td></tr>
<tr class="memdesc:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Stores algorithm parameters in a file storage.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a1f8ad7b8add515077367fb9949a174d2">More...</a><br/></td></tr>
<tr class="separator:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a763a62d1b03042eef7d7fc3ac6c87c79">write</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &gt; &amp;fs, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;name=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>()) const</td></tr>
<tr class="memdesc:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a763a62d1b03042eef7d7fc3ac6c87c79">More...</a><br/></td></tr>
<tr class="separator:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:adb7a50ef5f200ad9559e9b0e976cfa59"><td align="right" class="memItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html">StereoSGBM</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#adb7a50ef5f200ad9559e9b0e976cfa59">create</a> (int minDisparity=0, int numDisparities=16, int blockSize=3, int P1=0, int P2=0, int disp12MaxDiff=0, int preFilterCap=0, int uniquenessRatio=0, int speckleWindowSize=0, int speckleRange=0, int mode=<a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a74120f5b7739495309c57f2da1c3e8cca21fac9fae6db6a60a940fd24cc61f081">StereoSGBM::MODE_SGBM</a>)</td></tr>
<tr class="memdesc:adb7a50ef5f200ad9559e9b0e976cfa59"><td class="mdescLeft"> </td><td class="mdescRight">Creates <a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html" title="The class implements the modified H. Hirschmuller algorithm  that differs from the original one as fo...">StereoSGBM</a> object.  <a href="#adb7a50ef5f200ad9559e9b0e976cfa59">More...</a><br/></td></tr>
<tr class="separator:adb7a50ef5f200ad9559e9b0e976cfa59"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_static_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Static Public Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a623841c33b58ea9c4847da04607e067b">load</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;objname=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Loads algorithm from the file.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a623841c33b58ea9c4847da04607e067b">More...</a><br/></td></tr>
<tr class="separator:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a3ba305a10d02479c13cf7d169c321547">loadFromString</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;strModel, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;objname=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Loads algorithm from a String.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a3ba305a10d02479c13cf7d169c321547">More...</a><br/></td></tr>
<tr class="separator:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#ad8c591bacb34c485f5b7a250c314fc53">read</a> (const <a class="el" href="../../de/dd9/classcv_1_1FileNode.html">FileNode</a> &amp;fn)</td></tr>
<tr class="memdesc:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Reads algorithm from the file node.  <a href="../../d3/d46/classcv_1_1Algorithm.html#ad8c591bacb34c485f5b7a250c314fc53">More...</a><br/></td></tr>
<tr class="separator:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Protected Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a68eeca71617474ad3d4561786f0289d2 inherit pro_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a68eeca71617474ad3d4561786f0289d2">writeFormat</a> (<a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &amp;fs) const</td></tr>
<tr class="separator:a68eeca71617474ad3d4561786f0289d2 inherit pro_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The class implements the modified H. Hirschmuller algorithm <a class="el" href="../../d0/de3/citelist.html#CITEREF_HH08">[112]</a> that differs from the original one as follows: </p>
<ul>
<li>By default, the algorithm is single-pass, which means that you consider only 5 directions instead of 8. Set mode=<a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a74120f5b7739495309c57f2da1c3e8cca0f746667febe92e1189e924c40752660">StereoSGBM::MODE_HH</a> in createStereoSGBM to run the full variant of the algorithm but beware that it may consume a lot of memory.</li>
<li>The algorithm matches blocks, not individual pixels. Though, setting blockSize=1 reduces the blocks to single pixels.</li>
<li>Mutual information cost function is not implemented. Instead, a simpler Birchfield-Tomasi sub-pixel metric from <a class="el" href="../../d0/de3/citelist.html#CITEREF_BT98">[23]</a> is used. Though, the color images are supported as well.</li>
<li>Some pre- and post- processing steps from K. Konolige algorithm <a class="el" href="../../d9/dba/classcv_1_1StereoBM.html" title="Class for computing stereo correspondence using the block matching algorithm, introduced and contribu...">StereoBM</a> are included, for example: pre-filtering (<a class="el" href="../../d9/dba/classcv_1_1StereoBM.html#a47d98ddb53c39777a8c75ed3425bd66aabf381e03e290b2b94541738193a6abd6">StereoBM::PREFILTER_XSOBEL</a> type) and post-filtering (uniqueness check, quadratic interpolation and speckle filtering).</li>
</ul>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>(Python) An example illustrating the use of the <a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html" title="The class implements the modified H. Hirschmuller algorithm  that differs from the original one as fo...">StereoSGBM</a> matching algorithm can be found at opencv_source_code/samples/python/stereo_match.py </li>
</ul>
</dd></dl>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a74120f5b7739495309c57f2da1c3e8cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74120f5b7739495309c57f2da1c3e8cc">◆ </a></span>anonymous enum</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a74120f5b7739495309c57f2da1c3e8cca21fac9fae6db6a60a940fd24cc61f081"></a>MODE_SGBM </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a74120f5b7739495309c57f2da1c3e8cca0f746667febe92e1189e924c40752660"></a>MODE_HH </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a74120f5b7739495309c57f2da1c3e8ccaa3ffd07d169f0d913c2402bf20595a9f"></a>MODE_SGBM_3WAY </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a74120f5b7739495309c57f2da1c3e8cca2bb93a960b8709039f81d7027b928559"></a>MODE_HH4 </td><td class="fielddoc"></td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="adb7a50ef5f200ad9559e9b0e976cfa59"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb7a50ef5f200ad9559e9b0e976cfa59">◆ </a></span>create()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html">StereoSGBM</a>&gt; cv::StereoSGBM::create </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>minDisparity</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>numDisparities</em> = <code>16</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>blockSize</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>P1</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>P2</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>disp12MaxDiff</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>preFilterCap</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>uniquenessRatio</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>speckleWindowSize</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>speckleRange</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>mode</em> = <code><a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a74120f5b7739495309c57f2da1c3e8cca21fac9fae6db6a60a940fd24cc61f081">StereoSGBM::MODE_SGBM</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.StereoSGBM_create(</td><td class="paramname">[, minDisparity[, numDisparities[, blockSize[, P1[, P2[, disp12MaxDiff[, preFilterCap[, uniquenessRatio[, speckleWindowSize[, speckleRange[, mode]]]]]]]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Creates <a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html" title="The class implements the modified H. Hirschmuller algorithm  that differs from the original one as fo...">StereoSGBM</a> object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">minDisparity</td><td>Minimum possible disparity value. Normally, it is zero but sometimes rectification algorithms can shift images, so this parameter needs to be adjusted accordingly. </td></tr>
    <tr><td class="paramname">numDisparities</td><td>Maximum disparity minus minimum disparity. The value is always greater than zero. In the current implementation, this parameter must be divisible by 16. </td></tr>
    <tr><td class="paramname">blockSize</td><td>Matched block size. It must be an odd number &gt;=1 . Normally, it should be somewhere in the 3..11 range. </td></tr>
    <tr><td class="paramname">P1</td><td>The first parameter controlling the disparity smoothness. See below. </td></tr>
    <tr><td class="paramname">P2</td><td>The second parameter controlling the disparity smoothness. The larger the values are, the smoother the disparity is. P1 is the penalty on the disparity change by plus or minus 1 between neighbor pixels. P2 is the penalty on the disparity change by more than 1 between neighbor pixels. The algorithm requires P2 &gt; P1 . See stereo_match.cpp sample where some reasonably good P1 and P2 values are shown (like 8*number_of_image_channels*blockSize*blockSize and 32*number_of_image_channels*blockSize*blockSize , respectively). </td></tr>
    <tr><td class="paramname">disp12MaxDiff</td><td>Maximum allowed difference (in integer pixel units) in the left-right disparity check. Set it to a non-positive value to disable the check. </td></tr>
    <tr><td class="paramname">preFilterCap</td><td>Truncation value for the prefiltered image pixels. The algorithm first computes x-derivative at each pixel and clips its value by [-preFilterCap, preFilterCap] interval. The result values are passed to the Birchfield-Tomasi pixel cost function. </td></tr>
    <tr><td class="paramname">uniquenessRatio</td><td>Margin in percentage by which the best (minimum) computed cost function value should "win" the second best value to consider the found match correct. Normally, a value within the 5-15 range is good enough. </td></tr>
    <tr><td class="paramname">speckleWindowSize</td><td>Maximum size of smooth disparity regions to consider their noise speckles and invalidate. Set it to 0 to disable speckle filtering. Otherwise, set it somewhere in the 50-200 range. </td></tr>
    <tr><td class="paramname">speckleRange</td><td>Maximum disparity variation within each connected component. If you do speckle filtering, set the parameter to a positive value, it will be implicitly multiplied by 16. Normally, 1 or 2 is good enough. </td></tr>
    <tr><td class="paramname">mode</td><td>Set it to <a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html#a74120f5b7739495309c57f2da1c3e8cca0f746667febe92e1189e924c40752660">StereoSGBM::MODE_HH</a> to run the full-scale two-pass dynamic programming algorithm. It will consume O(W*H*numDisparities) bytes, which is large for 640x480 stereo and huge for HD-size pictures. By default, it is set to false .</td></tr>
  </table>
  </dd>
</dl>
<p>The first constructor initializes <a class="el" href="../../d2/d85/classcv_1_1StereoSGBM.html" title="The class implements the modified H. Hirschmuller algorithm  that differs from the original one as fo...">StereoSGBM</a> with all the default parameters. So, you only have to set StereoSGBM::numDisparities at minimum. The second constructor enables you to set each parameter to a custom value. </p>
</div>
</div>
<a id="a27faa3d735e82d2b44f8eb13e2ba0a90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27faa3d735e82d2b44f8eb13e2ba0a90">◆ </a></span>getMode()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cv::StereoSGBM::getMode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.StereoSGBM.getMode(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="a387cc8f9a90d0b43b491bb1a55357023"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a387cc8f9a90d0b43b491bb1a55357023">◆ </a></span>getP1()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cv::StereoSGBM::getP1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.StereoSGBM.getP1(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="a5ad84c9f98f5ed4663bc9f50fc00d413"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ad84c9f98f5ed4663bc9f50fc00d413">◆ </a></span>getP2()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cv::StereoSGBM::getP2 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.StereoSGBM.getP2(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="a400e482f280339ce05beccd9ed9e5bfb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a400e482f280339ce05beccd9ed9e5bfb">◆ </a></span>getPreFilterCap()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cv::StereoSGBM::getPreFilterCap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.StereoSGBM.getPreFilterCap(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="aa0f168808513cabc221b763664791185"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0f168808513cabc221b763664791185">◆ </a></span>getUniquenessRatio()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cv::StereoSGBM::getUniquenessRatio </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.StereoSGBM.getUniquenessRatio(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="a32617c11dbdac9b689711a38cd928017"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32617c11dbdac9b689711a38cd928017">◆ </a></span>setMode()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::StereoSGBM::setMode </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.StereoSGBM.setMode(</td><td class="paramname">mode</td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="ae62e17715deea97b431d328869a3eace"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae62e17715deea97b431d328869a3eace">◆ </a></span>setP1()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::StereoSGBM::setP1 </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>P1</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.StereoSGBM.setP1(</td><td class="paramname">P1</td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="a13a55a4704c988fa60e5f5902c4abfaa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13a55a4704c988fa60e5f5902c4abfaa">◆ </a></span>setP2()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::StereoSGBM::setP2 </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>P2</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.StereoSGBM.setP2(</td><td class="paramname">P2</td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="a03019cccd79bcc833dd2423c55654975"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03019cccd79bcc833dd2423c55654975">◆ </a></span>setPreFilterCap()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::StereoSGBM::setPreFilterCap </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>preFilterCap</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.StereoSGBM.setPreFilterCap(</td><td class="paramname">preFilterCap</td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="ac7b3c009706c6809211b7c5e79434ebd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7b3c009706c6809211b7c5e79434ebd">◆ </a></span>setUniquenessRatio()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::StereoSGBM::setUniquenessRatio </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>uniquenessRatio</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.StereoSGBM.setUniquenessRatio(</td><td class="paramname">uniquenessRatio</td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/<a class="el" href="../../d2/d28/calib3d_8hpp.html">calib3d.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:43 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
